package com.leyou.upload.config;


import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author syf
 * @version 1.0
 * @date 2019/08/02 09:59
 * @Description TODO:
 */
@Configuration
public class OSSConfig {

    @Bean
    public OSS ossConfig(OSSProperties prop){
        return new OSSClientBuilder().build(prop.getEndpoint(),prop.getAccessKeyId(),prop.getAccessKeySecret());
    }
}
